import {lazy} from "react"
// import {JSXElement} from "@babel/types"
import {RouterList} from "../untils/index"

export let mainrouter=[{
    path:"/index/home",
    element:lazy(()=>import("../page/index/Home")),
    title:"首页",
    icon:"FriendsO"
},{
    path:"/index/classfy",
    element:lazy(()=>import("../page/index/Classfy")),
    title:'分类',
    icon:"HomeO"
},{
    path:"/index/my",
    element:lazy(()=>import("../page/index/My")),
    title:"我的",
    icon:"Search"
},{
    path:"/index/nav",
    element:lazy(()=>import("../page/index/Nav")),
    title:"导航",
    icon:"SettingO"
},]
const routes:RouterList=[
    {
        path:"/index",
        element:lazy(()=>import("../page/Index")),
        children:mainrouter,
    },
    {
        path:"/login",
        element:lazy(()=>import("../page/Login"))
    },
    {
        path:"*",
        element:lazy(()=>import("../page/Error"))
    },{
        path:"/",
        to:"/index/home"
    },{
        path:"/deils/:id",
        element:lazy(()=>import("../page/Deils"))
    }

]

export default routes